    /* Copyright (c) 2020 Qualcomm Technologies International, Ltd. */
/*   %%version */
/****************************************************************************
FILE
    debug_partition_if.h

CONTAINS
    Definitions for Debug Partition.

DESCRIPTION
    This file is seen by the firmware and VM applications, and
    contains things that are common between them.
*/

#ifndef DEBUG_PARTITION_IF_H
#define DEBUG_PARTITION_IF_H

/** Debug Partition Configuration Keys for Application Subsystem (16-bit) and general configuration
 *
 * Overlapping ranges to dump should be avoided to conserve flash dump space.
 */
typedef enum
{
    /** Clear configuration keys.
     *
     * Clear all previously configured keys, meaning nothing is dumped.
     */
    DP_CONFIG_CLEAR_ALL = 0,

    /** Set destination for writing debug events.
     *
     * Set new destination for debug events.
     * Can be called repeatedly during runtime.
     *
     * Possible key values:
     *
     * A value from the debug_event_destination enum
     *
     * Possible return values and their meaning:
     *
     * DP_SUCCESS - The destination has been set
     * DP_BUSY - The stream source opened with StreamDebugPartitionSource() has to be closed before
     * the destination can be changed
     * DP_NOT_CONFIGURED - the selected destination is not accessible
     * DP_INVALID_PARAMETER - invalid/unsupported destination ID supplied
     * DP_DATA_CORRUPT - The selected destination contains invalid data and must be erased. No debug
     * events will be written until the partition is erased.
     *
     * NOTES:
     * - The destination must either be empty / erased or must contain valid debug partition events.
     * - If any data is written into the destination between the time this configuration call is
     * made and the time the system panics the debug partition event may not be written correctly.
     * - The default destination after boot is DEBUG_EVENT_DESTINATION_DEBUG_PARTITION.
     * - DebugPartitionErase() is a blocking call and using it to erase the other flash bank (after
     * selecting DEBUG_EVENT_DESTINATION_OTHER_BANK as the destination) may block the Apps P1 application
     * for a very long time (or cause an Apps P0 panic with PANIC_TRAP_TIMEOUT if the erase takes longer
     * than the timeout set through the TrapTimeout MIB key). It is recommended that the Apps P1
     * application uses ImageUpgradeErase() to erase the other flash bank instead.
     */
    DP_CONFIG_SET_DESTINATION = 1,

    /** Dump minimal set of Apps P1 registers plus enough to decode P1 exceptions.
     *
     * The following Apps P1 registers are dumped:
     * REGFILE_(PC, RMAC2-RMAC0, RMAC24, R0-R10, RLINK),
     * STACK_(START_ADDR, END_ADDR, POINTER, OVERFLOW_PC), FRAME_POINTER,
     * INT_SAVE_INFO, INT_SOURCE,
     * EXCEPTION_PC, EXCEPTION_TYPE,
     * APPS_BANKED_EXCEPTIONS_P1_STATUS,
     * APPS_SYS_APU_STATUS, APPS_SYS_APU_FAULT_ADDRESS,
     * STATUS
     *
     * If any of these overlap with DP_CONFIG_DUMP_P1_REG_RANGE or _P1_DM_RANGE, those
     * registers will be dumped twice, no filtering of duplicates is performed.
     */
    DP_CONFIG_DUMP_P1_BASIC_REGS = 0x10,

    /** Dump minimal set of Apps P0 registers plus enough to decode P0 exceptions.
     *
     * The following Apps P0 registers are dumped:
     * REGFILE_(R4-R9),
     * STACK_(START_ADDR, END_ADDR, POINTER, OVERFLOW_PC), FRAME_POINTER,
     * TEST_REG_0, TEST_REG_1, TEST_REG_2, TEST_REG_3
     * INT_SAVE_INFO, INT_SOURCE,
     * EXCEPTION_PC, EXCEPTION_TYPE,
     * APPS_BANKED_EXCEPTIONS_P0_STATUS,
     *
     * Values of REGFILE_(PC and RLINK) dumped ensure that pydbg can unwind the stack.
     *
     * Values are stored for REGFILE_(RMAC2-RMAC0, RMAC24, R0-R3 and R10), but these will not
     * be representative of the state of the P0 core.
     *
     * If any of these overlap with DP_CONFIG32_P0_DM_RANGE, those
     * registers will be dumped twice, no filtering of duplicates is performed.
     */
    DP_CONFIG_DUMP_P0_BASIC_REGS = 0x11,

    /** Dump Apps P1 application stack or stacks.
     *
     * Location of hardware stack is determined by looking into Apps P1 registers:
     * [STACK_START_ADDR:STACK_END_ADDR].
     *
     * Location of the FreeRTOS task stack is determined by reading Apps P1 SLT
     * entry APPS_SLT_CURRENT_TCB_STACK_START_END. If this is present and it points
     * to a different stack than the hardware stack then both stacks are dumped
     * since that means an interrupt or exception is being handled.
     *
     * If either of these overlap with custom memory ranges the data will be dumped
     * twice, no filtering of duplicates is performed.
     */
    DP_CONFIG_DUMP_P1_STACK = 0x20,

    /** Dump Apps P0 stack.
     *
     * Location of hardware stack is determined by looking into Apps P0 registers:
     * [STACK_START_ADDR:STACK_END_ADDR].
     */
    DP_CONFIG_DUMP_P0_STACK = 0x21,

    /** Dump Apps P1 Hydra log data
     *
     * Location and size of P1 Hydra log buffer and position is determined by
     * reading Apps P1 SLT entry APPS_SLT_HYDRA_LOG_BUFFER_AND_POS. If present this
     * provides all the information and any custom log buffer size given is ignored.
     *
     * If APPS_SLT_HYDRA_LOG_BUFFER_AND_POS is not present, dump block of Apps P1 RAM
     * with Hydra log starting four bytes after P1D_P1_DM_RAM_LOWER start offset.
     * Block of data consists of the log buffer followed by 4 bytes of log position.
     * Application can either provide log buffer size in bytes in the upper 2 octets
     * of the trap argument or set them to "0" to use the default size.
     *
     * Use APPS_SLT_HYDRA_LOG_BUFFER_AND_POS or default log buffer size:
     *      DebugPartitionConfig(DP_CONFIG_DUMP_P1_HYDRA_LOG, 1);
     *
     * Use APPS_SLT_HYDRA_LOG_BUFFER_AND_POS or custom log buffer size:
     *      DebugPartitionConfig(DP_CONFIG_DUMP_P1_HYDRA_LOG,
     *                           (custom_log_size_bytes << 16) | 1));
     *
     * Default size is platform dependent. If application changes default
     * log buffer size then the new size has to be provided in the trap
     * argument if APPS_SLT_HYDRA_LOG_BUFFER_AND_POS is not present in the P1 SLT.
     *
     * If this overlaps with a custom memory range the data will be dumped twice,
     * no filtering of duplicates is performed.
     */
    DP_CONFIG_DUMP_P1_HYDRA_LOG = 0x30,

    /** Dump Apps P0 Hydra log data
     *
     * If this overlaps with a custom memory range the data will be dumped twice,
     * no filtering of duplicates is performed.
     */
    DP_CONFIG_DUMP_P0_HYDRA_LOG = 0x31,

    /** Dump Apps P0 BT stack prim log data
     *
     * Note that at least one aspect of Apps P1 has to be included in the dump for
     * pydbg to decode the prim log as it requires access to the Apps P1 core object.
     *
     * If this overlaps with a custom memory range the data will be dumped twice,
     * no filtering of duplicates is performed.
     */
    DP_CONFIG_DUMP_P0_PRIM_LOG = 0x32,

    /** Dump Apps P0 stream buffers and registers
     *
     * This dumps Apps shared RAM PxD_SHARED_DM_RAM_LOWER to PxD_SHARED_DM_RAM_UPPER,
     * together with the following registers:
     *
     * VM_FREE_LIST_(ADDR, END_ADDR, NEXT_ADDR)
     * BUS_MESSAGE_TX_BODY(0-3), BUS_MESSAGE_RX_BODY(0-5),
     * BUS_MESSAGE_TX_DESTINATION
     *
     * Note that all of Apps P0 data RAM (dumped using DP_CONFIG32_DUMP_P0_DM_RANGE)
     * will also be needed for this data to be useful.
     *
     * If this overlaps with a custom memory range the data will be dumped twice,
     * no filtering of duplicates is performed.
     */
    DP_CONFIG_DUMP_P0_STREAM_BUFFERS = 0x33,

    /** Dump custom range of Apps P1 registers.
     *
     * The range is defined relative to 0xFFFF8000 in the Apps P1 memory space.
     * Start offset and length in bytes are encoded in the 32-bit parameter value
     * as follows: (((start & 0xffff) << 16) | (length_bytes & 0xffff)).
     * Application can use supplied macro DEBUG_PARTITION_PACK(offset, length_bytes).
     *
     * For example to dump three consecutive registers
     * STACK_START_ADDR(0xffff8018), STACK_END_ADDR(0xffff801c) and
     * STACK_POINTER(0xffff8020), parameter value would be:
     * DEBUG_PARTITION_PACK(0x18, 0xc) == 0x0018000C.
     * This is better achieved by requesting DP_CONFIG_DUMP_P1_BASIC_REGS.
     *
     * An arbitrary number of custom ranges can be configured by calling the
     * trap multiple times. Overlapping registers either here or with
     * DP_CONFIG_DUMP_P1_BASIC_REGS or _P1_DM_RANGE will be dumped as specified,
     * no filtering of duplicates is performed.
     */
    DP_CONFIG_DUMP_P1_REG_RANGE = 0x40,

    /** Dump custom range of Apps P1 RAM addresses with 16 bit offset and length.
     *
     * The range is defined relative to the start of Apps P1 RAM window
     * P1D_P1_DM_RAM_LOWER, which can change for different device chips.
     * Start offset and length in bytes are encoded in the 32 bit parameter value
     * as follows: (((start & 0xffff) << 16) | (length_bytes & 0xffff)).
     * Application can use supplied macro DEBUG_PARTITION_PACK(offset, length_bytes).
     *
     * Allowable RAM areas to dump are:
     *      P1D_P1_DM_RAM_LOWER to P1D_P1_DM_RAM_UPPER limited to 16 bits
     *
     * For example to dump 0x400 bytes of Apps P1 Hydra log that starts at
     * P1D_P1_DM_RAM_LOWER + 4 and the following 4 bytes of log position, parameter
     * value would be: DEBUG_PARTITION_PACK(0x4, 0x404) == 0x00040404.
     * This is better achieved by requesting DP_CONFIG_DUMP_P1_HYDRA_LOG.
     *
     * An arbitrary number of custom ranges can be configured by calling the trap
     * multiple times. Overlapping memory in any range or as DP_CONFIG_DUMP_P1_STACK
     * or _P1_HYDRA_LOG will be dumped as specified, no filtering of duplicates is
     * performed.
     */
    DP_CONFIG_DUMP_P1_RAM_RANGE = 0x50,

    /** Maximum value for the config key */
    DP_CONFIG_MAX = 0xffff
} debug_partition_config_key;

/** Debug Partition Configuration Keys for Application Subsystem (32bit)
 *
 * Overlapping ranges to dump should be avoided to conserve flash dump space.
 */
typedef enum
{
    /** Dump custom range of Apps P1 RAM addresses with 32 bit offset and length.
     *
     * The range is defined relative to the start of Apps P1 RAM window
     * P1D_P1_DM_RAM_LOWER, which can change for different device chips.
     * Start offset and length in bytes are given in two 32 bit parameters,
     * value1 for the start offset and value2 for the length in bytes.
     *
     * Allowable RAM areas to dump are:
     *      P1D_P1_DM_RAM_LOWER to P1D_P1_DM_RAM_UPPER
     *
     * Dump entire of P1 DM RAM:
     *      DebugPartitionConfig32(DP_CONFIG32_DUMP_P1_RAM_RANGE,
     *                             0,
     *                             P1D_P1_DM_RAM_UPPER - P1D_P1_DM_RAM_LOWER);
     *
     * An arbitrary number of custom ranges can be configured by calling the trap
     * multiple times. Overlapping memory in any range or as DP_CONFIG_DUMP_P1_STACK
     * or _P1_HYDRA_LOG will be dumped as specified, no filtering of duplicates is
     * performed.
     */
    DP_CONFIG32_DUMP_P1_RAM_RANGE = 0x60,

    /** Dump custom range of Apps P1 DM absolute addresses from zero.
     *
     * The range is defined as absolute addresses in Apps P1 DM memory.
     * Start address and length in bytes are given in two 32 bit parameters,
     * value1 for the start address and value2 for the length in bytes.
     *
     * Dump structure my_struct:
     *      DebugPartitionConfig32(DP_CONFIG32_DUMP_P1_DM_RANGE,
     *                             (uint32) &my_struct,
     *                             sizeof(my_struct));
     *
     * Dump adjacent registers REGFILE_NUM_RUNCLKS, REGFILE_NUM_INSTRS, REGFILE_NUM_CORE_STALLS:
     *      DebugPartitionConfig32(DP_CONFIG32_DUMP_P1_DM_RANGE,
     *                             (uint32) &REGFILE_NUM_RUNCLKS,
     *                             3 * sizeof(uint32));
     *
     * Dump entire of P1 DM RAM:
     *      DebugPartitionConfig32(DP_CONFIG32_DUMP_P1_DM_RANGE,
     *                             P1D_P1_DM_RAM_LOWER,
     *                             P1D_P1_DM_RAM_UPPER - P1D_P1_DM_RAM_LOWER);
     *
     * Dump entire of P1 TCM RAM:
     *      DebugPartitionConfig32(DP_CONFIG32_DUMP_P1_DM_RANGE,
     *                             PxD_TCM1_LOWER,
     *                             PxP_TCM1_SIZE);
     * On some device chips PxD_TCM1_UPPER - PxD_TCM1_LOWER is larger than the
     * P1 TCM RAM present, hence the use of PxP_TCM1_SIZE instead.
     * NB. Dumping P1 TCM is irrelevant unless P0 MIB ReserveP1TcmForData = true
     *
     * Do not specify unmapped or read sensitive DM memory, the results are
     * undefined. Do not dump across the 0xFFFF8000 base address of P1 registers,
     * any range should either be entirely below 0xFFFF8000 or equal/above it.
     *
     * An arbitrary number of custom ranges can be configured by calling the trap
     * multiple times. Overlapping memory in any range or as DP_CONFIG_DUMP_P1_STACK
     * or _P1_HYDRA_LOG, or overlapping registers in _P1_BASIC_REGS or _P1_REG_RANGE,
     * will be dumped as specified, no filtering of duplicates is performed.
     */
    DP_CONFIG32_DUMP_P1_DM_RANGE = 0x61,

    /** Dump custom range of Apps P0 DM absolute addresses from zero.
     *
     * The range is defined as absolute addresses in Apps P0 DM memory.
     * Start address and length in bytes are given in two 32 bit parameters,
     * value1 for the start address and value2 for the length in bytes.
     *
     * Dump adjacent registers REGFILE_NUM_RUNCLKS, REGFILE_NUM_INSTRS, REGFILE_NUM_CORE_STALLS:
     *      DebugPartitionConfig32(DP_CONFIG32_DUMP_P0_DM_RANGE,
     *                             (uint32) &REGFILE_NUM_RUNCLKS,
     *                             3 * sizeof(uint32));
     *
     * Dump entire of P0 DM RAM:
     *      DebugPartitionConfig32(DP_CONFIG32_DUMP_P0_DM_RANGE,
     *                             P0D_P0_DM_RAM_LOWER,
     *                             P0D_P0_DM_RAM_UPPER - P0D_P0_DM_RAM_LOWER);
     *
     * Dump entire of shared RAM:
     *      DebugPartitionConfig32(DP_CONFIG32_DUMP_P0_DM_RANGE,
     *                             PxD_SHARED_DM_RAM_LOWER,
     *                             PxD_SHARED_DM_RAM_UPPER - PxD_SHARED_DM_RAM_LOWER);
     * This is better achieved by requesting DP_CONFIG_DUMP_P0_STREAM_BUFFERS which
     * includes the registers necessary to make sense of the shared RAM.
     *
     * Do not specify unmapped or read sensitive DM memory, the results are
     * undefined. Do not dump across the 0xFFFF8000 base address of P0 registers,
     * any range should either be entirely below 0xFFFF8000 or equal/above it.
     *
     * An arbitrary number of custom ranges can be configured by calling the trap
     * multiple times. Overlapping memory in any range or as DP_CONFIG_DUMP_P0_STACK
     * or _P0_HYDRA_LOG will be dumped as specified, no filtering of duplicates is
     * performed.
     */
    DP_CONFIG32_DUMP_P0_DM_RANGE = 0x62,

    /** Maximum value for the config key */
    DP_CONFIG32_MAX = 0xffff
} debug_partition_config32_key;


/* Audio subsystem addresses and sizes not defined elsewhere */
#define AUDIO_SHARED_DM_RAM_LOWER   0x2000
#define AUDIO_PRIVATE_DM_RAM_LOWER  0
#define AUDIO_PRIVATE_DM_RAM_UPPER  0x1000

/** Debug Partition Configuration Keys for Audio Subsystem
 *
 * Overlapping ranges to dump should be avoided to conserve flash dump space.
 */
typedef enum
{
    /** Dump custom range of Audio PM with absolute address from zero.
     *
     * The range is defined as absolute addresses in Audio PM memory.
     * Start address and length are given in two 32 bit parameters,
     * value1 for the start address and value2 for the length in bytes.
     *
     * To dump all program memory (using constants from audio\<chip>\<ROM build>\kymera\output\<release ID>\build\preinclude_defs.h):
     *      DebugPartitionConfigAudio(DP_CONFIG_AUDIO_PROCESSOR_COMMON,
     *                                DP_CONFIG_AUDIO_PM,
     *                                PM_RAM_START_ADDRESS,
     *                                PM_RAM_END_ADDRESS - PM_RAM_START_ADDRESS)
     *
     * An arbitrary number of custom ranges can be configured by calling the trap
     * multiple times. Overlapping memory in any range will be dumped as specified,
     * no filtering of duplicates is performed.
     */
    DP_CONFIG_AUDIO_PM = 0,

    /** Dump custom range of Audio DM with absolute address from zero.
     *
     * The range is defined as absolute addresses in Audio DM memory.
     * Start address and length are given in two 32 bit parameters,
     * value1 for the start address and value2 for the length in bytes.
     *
     * To dump all common data memory (using constants from audio\<chip>\<ROM build>\kymera\output\<release ID>\build\preinclude_defs.h):
     *      DebugPartitionConfigAudio(DP_CONFIG_AUDIO_PROCESSOR_COMMON,
     *                                DP_CONFIG_AUDIO_DM,
     *                                AUDIO_SHARED_DM_RAM_LOWER,
     *                                DM_RAM_BANK_SIZE*NUMBER_DM_BANKS - AUDIO_SHARED_DM_RAM_LOWER)
     *
     * To dump all memory private to one Audio core:
     *      DebugPartitionConfigAudio(DP_CONFIG_AUDIO_PROCESSOR_Px,
     *                                DP_CONFIG_AUDIO_DM,
     *                                AUDIO_PRIVATE_DM_RAM_LOWER,
     *                                AUDIO_PRIVATE_DM_RAM_UPPER - AUDIO_PRIVATE_DM_RAM_LOWER)
     *
     * To dump value of register ANC_CONTROL0:
     *      DebugPartitionConfigAudio(DP_CONFIG_AUDIO_PROCESSOR_Px,
     *                                DP_CONFIG_AUDIO_DM,
     *                                <address of ANC_CONTROL0 in Audio subsystem>,
     *                                sizeof(uint32))
     *
     * An arbitrary number of custom ranges can be configured by calling the trap
     * multiple times. Overlapping memory in any range or overlapping with registers
     * in DP_CONFIG_AUDIO_BASIC_REGS will be dumped as specified, no filtering of
     * duplicates is performed.
     */
    DP_CONFIG_AUDIO_DM = 1,

    /** Dump a minimal set of processor registers for an Audio core.
     *
     * value1 set to zero value disables dumping of the registers
     * value1 set to a non-zero value enables dumping of the registers
     * value2 is ignored
     *
     * Dumping of registers is enabled/disabled for both cores when
     * processor == DP_CONFIG_AUDIO_PROCESSOR_COMMON
     *
     * Content of the following registers is dumped per core:
     * PC, rMAC2, rMAC1, rMAC0, rMAC24, R0, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10, RLINK, RFLAGS, RMACB24, I0, I1, I2, I3, I4, I5, I6,
     * I7, M0, M1, M2, M3, L0, L1, L4, L5, RUNCLKS, NUMINSTRS, NUMSTALLS, rMACB2, rMACB1, rMACB0, B0, B1, B4, B5, FP, SP, MM_DOLOOP_START,
     * MM_DOLOOP_END, MM_QUOTIENT, MM_REM, MM_RINTLINK, ARITHMETIC_MODE, STACK_START_ADDR, STACK_END_ADDR, STACK_POINTER, STACK_OVERFLOW_PC,
     * FRAME_POINTER, BITREVERSE_VAL, NUM_RUN_CLKS, NUM_INSTRS, NUM_CORE_STALLS, NUM_MEM_ACCESS_STALLS, NUM_INSTR_EXPAND_STALLS,
     * DBG_COUNTERS_EN, PC_STATUS, EXCEPTION_PC, EXCEPTION_TYPE, INT_SAVE_INFO, INT_SOURCE, INT_STATUS, INT_SOURCES_EN, INT_BLOCK_PRIORITY,
     * EXT_EXCEPTION_TYPE
     *
     * Content of the following common registers is dumped:
     * NVMEM_WIN0_CONFIG, BAC_BUFFER_HANDLE_BLOCK_OFFSET, BUS_MESSAGE_TX_DESTINATION, BUS_MESSAGE_TX_BODY0, BUS_MESSAGE_TX_BODY1,
     * BUS_MESSAGE_TX_BODY2, BUS_MESSAGE_TX_BODY3, BUS_MESSAGE_RX_BODY0, BUS_MESSAGE_RX_BODY1, BUS_MESSAGE_RX_BODY2, BUS_MESSAGE_RX_BODY3,
     * BUS_MESSAGE_RX_BODY4, BUS_MESSAGE_RX_BODY5
     *
     * If any of these overlap with DP_CONFIG_AUDIO_DM, those
     * registers will be dumped twice, no filtering of duplicates is performed.
     */
    DP_CONFIG_AUDIO_BASIC_REGS = 2,

    /** Maximum value for the config key */
    DP_CONFIG_AUDIO_MAX = 0xffff
} debug_partition_audio_config_key;

/* Audio Subsystem processor specification */
typedef enum
{
    DP_CONFIG_AUDIO_PROCESSOR_P0 = 0,
    DP_CONFIG_AUDIO_PROCESSOR_P1 = 1,
    DP_CONFIG_AUDIO_PROCESSOR_COMMON = 2
} debug_partition_audio_processor_key;

/** Result codes for Debug Partition traps. */
typedef enum {
    /** No error, operation completed as expected. */
    DP_SUCCESS,
    /** Debug Partition does not present in the image header. */
    DP_NOT_CONFIGURED,
    /** Operation can't be completed because resource is busy. For example
     * erase can't be started if there is an open Debug Partition
     * source stream. */
    DP_BUSY,
    /** Configuration/info key not supported by this firmware. */
    DP_KEY_NOT_SUPPORTED,
    /** Configuration key parameter is either outside the allowed range
     * or not supported. */
    DP_INVALID_PARAMETER,
    /** === DEPRECATED ===
     * Size of the dump is not checked during configuration, DebugPartitionConfig(),
     * DebugPartitionConfig32() and DebugPartitionConfigAudio() do not return this
     * result code any more.
     */
    DP_NOT_ENOUGH_SPACE,
    /** An internal error has occurred whilst trying to process the request */
    DP_ERROR,
    /** Partition contains invalid data */
    DP_DATA_CORRUPT
} debug_partition_result;

/** Macro to pack offset and size into the uint32 argument. */
#define DEBUG_PARTITION_PACK(offset, size) (uint32)(((offset) << 16) | \
                                             ((size) & 0xffff))

/** Macro to extract size from uint32 argument. */
#define DEBUG_PARTITION_GET_SIZE(value) (uint16)(value)
/** Macro to extract offset from uint32 argument. */
#define DEBUG_PARTITION_GET_OFFSET(value) (uint16)((value) >> 16)

/** Debug Partition Information Keys */
typedef enum
{
    /** Debug Partition size.
     *
     * Returns size of Debug Partition in bytes. This is different from
     * the size of data on the partition that can be queried with the
     * DP_INFO_DATA_SIZE key. */
    DP_INFO_PARTITION_SIZE = 0,

    /** Debug Partition data size.
     *
     * Returns size of data in the Debug Partition in bytes. */
    DP_INFO_DATA_SIZE = 1,

    /** Maximum value for the information key */
    DP_INFO_MAX = 0xffff
} debug_partition_info_key;

/* Flash location to write debug events / minicoredumps to */
typedef enum
{
    DEBUG_EVENT_DESTINATION_DEBUG_PARTITION = 0, /**< Write debug events to the debug partition in the active/boot flash bank (default after boot) */
    DEBUG_EVENT_DESTINATION_OTHER_BANK = 1       /**< Write debug events to the other flash bank */
} debug_event_destination;

#endif /* DEBUG_PARTITION_IF_H */
